package com.example.barcodeapp.adapter.ownadapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.barcodeapp.R;

public class AdapterOneDuiN extends RecyclerView.Adapter<AdapterOneDuiN.ViewHolder> {
    Context context;

    public AdapterOneDuiN(Context context) {
        this.context = context;
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.adapter_oneduin, parent, false);
        return new ViewHolder(inflate);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 5;
    }


    public class ViewHolder extends RecyclerView.ViewHolder {
        private ImageView oneduinImgImg;
        private TextView oneduinName;
        private TextView oneduinNeirong;
        private TextView oneduinTianshu;
        private TextView oneduinJiage;
        private TextView oneduinKeshi;
        private TextView oneduinTvChakan;

        public ViewHolder(@NonNull View itemView) {
            super(itemView);
            oneduinImgImg = (ImageView) itemView.findViewById(R.id.oneduin_img_img);
            oneduinName = (TextView) itemView.findViewById(R.id.oneduin_name);
            oneduinNeirong = (TextView) itemView.findViewById(R.id.oneduin_neirong);
            oneduinTianshu = (TextView) itemView.findViewById(R.id.oneduin_tianshu);
            oneduinJiage = (TextView) itemView.findViewById(R.id.oneduin_jiage);
            oneduinKeshi = (TextView) itemView.findViewById(R.id.oneduin_keshi);
            oneduinTvChakan = (TextView) itemView.findViewById(R.id.oneduin_tv_chakan);
        }
    }
}
